package br.com.werp.suporte.Empresa;
import java.util.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;

/**
 * Creation Date 17/12/2004 16:02:24
 * Last Modify Date 17/10/2006 14:39:17
 */

public class CargoFuncionarioDetalheActionForm extends org.apache.struts.action.ActionForm {
  public String tcfn_id;
  public String tcfn_descricao;
  private boolean valida = false;
  public CargoFuncionarioDetalheActionForm() {
  }
  /**
    * TCFN_ID: Gets the value of this field.
    */
  public String getTcfn_id() {
    return tcfn_id;
  }
  /**
     * TCFN_ID: Sets thhe value for this field.
     */
  public void setTcfn_id(String TCFN_ID) {
    tcfn_id = TCFN_ID;
  }
  /**
    * TCFN_DESCRICAO: Gets the value of this field.
    */
  public String getTcfn_descricao() {
    return tcfn_descricao;
  }
  /**
     * TCFN_DESCRICAO: Sets thhe value for this field.
     */
  public void setTcfn_descricao(String TCFN_DESCRICAO) {
    tcfn_descricao = TCFN_DESCRICAO;
  }
  /**
    * Reset all fields.
    */
  public void reset(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    tcfn_id = null;
    tcfn_descricao = null;
  }
  /**
    * Validate fields and return ActionErrors.
    */

  public ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    valida = false;
    if (com.egen.util.text.Validate.isValidate("update_action,delete_action,",
        request)) {
      if (com.egen.util.text.Validate.isNull(tcfn_id)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","tcfn_id","tcfn_id",
                "0"));
      }
      if (com.egen.util.text.Validate.isNull(tcfn_descricao)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","Nome Cargo","tcfn_descricao",
                "0"));
      }
    }
    if (errors != null && errors.size() > 0) {
      javax.servlet.http.HttpSession session = request.getSession(true);
      ActionForward actionForward = null;
      session.setAttribute(mapping.getName(), this);
    }
    return errors;
  }
}
